package com.ljf.framework.password;

/**
 * 说明：默认加密方法
 *
 * @Auther: lijinfeng
 * @Date: 2024/4/10
 */
public class PasswordEncoderServiceDefaultImpl implements PasswordEncoderService{

    @Override
    public String encode(CharSequence rawPassword) {
        return PasswordEncoderUtils.hashEncoderString(rawPassword.toString(),"MD5");
    }

    @Override
    public boolean matches(CharSequence rawPassword, String encodedPassword) {
        return encode(rawPassword).equals(encodedPassword);
    }





}
